package com.dianping.cat.configuration.server.entity;

import com.dianping.cat.configuration.server.BaseEntity;
import com.dianping.cat.configuration.server.IVisitor;
import java.util.LinkedHashMap;
import java.util.Map;




public class Server
  extends BaseEntity<Server>
{
  private String m_id;
/*  15 */   private Map<String, Property> m_properties = new LinkedHashMap();

  
  private StorageConfig m_storage;

  
  private ConsumerConfig m_consumer;


  
  public Server(String id) { this.m_id = id; }



  
/*  30 */   public void accept(IVisitor visitor) { visitor.visitServer(this); }

  
  public Server addProperty(Property property) {
/*  34 */     this.m_properties.put(property.getName(), property);
/*  35 */     return this;
  }

  
  public boolean equals(Object obj) {
/*  40 */     if (obj instanceof Server) {
/*  41 */       Server _o = (Server)obj;

/*  43 */       if (!equals(getId(), _o.getId())) {
/*  44 */         return false;
      }
      
/*  47 */       return true;
    }
    
/*  50 */     return false;
  }

  
/*  54 */   public Property findProperty(String name) { return (Property)this.m_properties.get(name); }



/*  58 */   public ConsumerConfig getConsumer() { return this.m_consumer; }



/*  62 */   public String getId() { return this.m_id; }



/*  66 */   public Map<String, Property> getProperties() { return this.m_properties; }



/*  70 */   public StorageConfig getStorage() { return this.m_storage; }







/*  84 */   public void mergeAttributes(Server other) { assertAttributeEquals(other, "server", "id", this.m_id, other.getId()); }




/*  89 */   public Property removeProperty(String name) { return (Property)this.m_properties.remove(name); }

  
  public Server setConsumer(ConsumerConfig consumer) {
/*  93 */     this.m_consumer = consumer;
/*  94 */     return this;
  }
  
  public Server setId(String id) {
/*  98 */     this.m_id = id;
/*  99 */     return this;
  }
  
  public Server setStorage(StorageConfig storage) {
/* 103 */     this.m_storage = storage;
/* 104 */     return this;
  }
  
  public Server() {}
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-core-3.0.0.jar!/com/dianping/cat/configuration/server/entity/Server.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */